package com.own.business.elasticsearch.controller.doc;

import com.own.component.springdoc.DefaultSecuritySpringDocConfiguration;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

import javax.annotation.Resource;

/**
 * ElasticsearchApiDocConfiguration
 *
 * @author chenxueli
 * @date 2024-05-08 12:55:30
 */
@SpringBootConfiguration
public class ElasticsearchApiDocConfiguration {

    @Resource
    private DefaultSecuritySpringDocConfiguration defaultSecuritySpringDocConfiguration;

    @Bean
    public GroupedOpenApi elasticsearchApiDoc() {
        return defaultSecuritySpringDocConfiguration.create(
                "搜索引擎管理",
                this.getClass().getPackageName(),
                "com.own.business.elasticsearch.controller"
        );
    }

}
